﻿<%if not in_sdcms then response.write("template load fail"):response.end() end if%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Keywords" content="{sdcms[seokey]}" />
<meta name="Description" content="{sdcms[seodesc]}" />
<title>{rsshow[title]}_{sdcms[webname]} - powered by sdcms</title>
<link href="{webroot}lib/css/base.css" rel="stylesheet" type="text/css" />
<link href="{webroot}theme/default/css/public.css" rel="stylesheet" type="text/css" />
<link href="{webroot}theme/default/css/artlist.css" rel="stylesheet" type="text/css" />
<link href="{webroot}theme/default/css/book.css" rel="stylesheet" type="text/css" />
<script>var webroot="{webroot}";</script>
<script src="{webroot}lib/js/jquery.js"></script>
<script src="{webroot}lib/js/jquery-migrate-1.1.0.min.js"></script>
<script src="{webroot}lib/tips/jquery.tips.js"></script>
<script src="{webroot}lib/js/base.js"></script>
<script src="{webroot}lib/js/mobile.js"></script>
<script src="{webroot}lib/validator/jquery.validator.js"></script>
<script src="{webroot}lib/validator/zh_CN.js"></script>
<script src="{webroot}lib/js/sdcms.book.js"></script>
<script src="{webroot}theme/default/js/sdcms.js"></script>
</head>

<body>
    {sdcms:include("sdcms_head.asp")}
    
    <div id="position">
您所在的位置：<a href="{webroot}">首页</a> > {rsshow[title]}</div>
    <div class="w980 mt10 mc" id="container">
        <div class="left">
            <div class="w610 b">
                <div class="title">{rsshow[title]}</div>
                    <form class="formname" method="post" >
                    <div class="bookadd">
                        {if isarray(form_data)}
                        {for i=0 to ubound(form_data,2)}
                        <div class="label">{form_data(1,i)}：{if form_data(8,i)=1}<span>*</span>{/if}</div>
                        <div class="enter">{get_self_field(form_data(0,i),form_data(1,i),form_data(2,i),form_data(3,i),form_data(5,i),form_data(7,i),form_data(8,i),form_data(9,i),form_data(6,i),"ip","ips")}</div>
                        {/for}
                        {/if}
                        {if rsshow[iscode]=1}
                        <div class="label">验证码：<span>*</span></div>
                        <div class="enter"><input type="text" name="code" id="code" size="4" maxlength="4" data-rule="验证码:required;" class="ip" /> <img src="{webroot}lib/imgcode.asp?t0=80&t1=20" title="看不清楚？点击刷新！" align="absmiddle" id="imgcode" onClick="this.src+='&'+Math.random();" /><span for="code" class="msg-box"></span></div>
                        {/if}
                        <div class="label"></div>
                        <div class="enter"><input type="submit" value="提交" class="bnt" /> <input type="reset" value="重设" class="bnt" /></div>
                    </div>
                    </form>
            </div>
        </div>
        <div class="right">
            <div class="b">
                <div class="subject">热评话题</div>
                <ul class="toplist">
                    {sdcms:rs top="10" field="id,title,style,createdate,isurl,url,classid" table="sd_content" where="islock=1 and comments>0" order="comments desc,id desc"}
                    {rs:eof}<li>没有资料</li>{/rs:eof}
                    <li><a href="comment.asp?id={$rs[id]}" title="{$rs[title]}"{if $rs[isurl]=1} target="_blank"{/if} {$rs[style]}>{sdcms.cutstr($rs[title],30,1)}</a></li>
                    {/sdcms:rs}   
                </ul>
            </div>
            
            <div class="b mt10">
                <div class="subject">随机推荐</div>
                <ul class="toplist">
                    {sdcms:rs top="10" field="id,title,style,createdate,isurl,url,classid" table="sd_content" where="islock=1" order="rnd"}
                    {rs:eof}<li>没有资料</li>{/rs:eof}
                    <li><a href="{$rs[link]}" title="{$rs[title]}"{if $rs[isurl]=1} target="_blank"{/if} {$rs[style]}>{sdcms.cutstr($rs[title],30,1)}</a></li>
                    {/sdcms:rs}   
                </ul>
            </div>
            
        </div>
    </div>
    <script>
	$(".formname").validator(
		{
			stopOnError:true,
			theme:'yellow_right_effect',
			ignore:':hidden',
			beforeSubmit:function(){$("input[type='submit']").attr("disabled",true);},
			valid:function(form)
			{
				$.fn.tips({type:'loading',content:'数据提交中'});
				$.ajax(
				{
					url:"?act=db&id={id}",
					type:"post",
					data:$(form).serialize(),
					success:function(data){
						data=jQuery.parseJSON(data);
						var type="warn";
						if(data.status=="y"){type="ok";}
						$.fn.tips({type:type,content:data.info});
						if(data.status=="y"){setTimeout('location.href="?id={id}"',1000);}
						else
						{$("input[type='submit']").attr("disabled",false);}
					}
				});
			},
			invalid:function(){$("input[type='submit']").attr("disabled",false);}
		}
	);
	</script>
    {sdcms:include("sdcms_foot.asp")}